package com.moyuwanjia.test;

import com.moyuwanjia_anno.entity.Account02_anno;
import com.moyuwanjia_anno.service.IAccountService;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @author 摸鱼丸加~
 * @create 2022-04-24 15:31
 *
 *
 */
@Slf4j
@RunWith(SpringJUnit4ClassRunner.class)
@SpringJUnitConfig(locations = "classpath:bean_anno.xml")
public class AccountTest_anno {
    @Autowired
    IAccountService iAccountService;

    @Test
    public void test01(){
        iAccountService.saveAccount(new Account02_anno(5,"moyu",40000F));
    }

    @Test
    public void test02(){
        //测试环绕通知
        iAccountService.transfer("MoYuWanJia","ccc",100F);
    }

}
